package com.example.proxy1_static;

public class AppTest {
    public static void main(String[] args) {
        IMessage msg = new ProxyMsg(new QQMsg());
        msg.send("hello, world");

        msg = new ProxyMsg(new WxMsg());
        msg.send("hello, world");

        // output:
        //     connecting
        //     send qq msg: hello, world
        //     closing.
        //     connecting
        //     send wx msg: hello, world
        //     closing.
    }
}